/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */

.source-header {
  display: flex;
  width: 100%;
  height: var(--editor-header-height);
  background-color: var(--theme-tab-background);
  border-radius: 8px 8px 0 0;
  overflow: scroll;
  scrollbar-width: none;
}

.source-header * {
  user-select: none;
}

.source-header .command-bar {
  flex: initial;
  flex-shrink: 0;
  border-bottom: 0;
  border-inline-start: 1px solid var(--theme-splitter-color);
  background-color: var(--theme-tab-background);
}

.source-tabs {
  align-self: flex-start;
  align-items: flex-start;
  display: flex;
}

.source-header::-webkit-scrollbar {
  display: none;
}

.source-tab {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 40px;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 10px;
  cursor: default;
  height: var(--editor-header-height);
  font-size: 15px;
  background-color: transparent;
  vertical-align: bottom;
}

.source-tab .filename {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  padding-inline-end: 4px;
}

.source-tab {
  color: var(--tab-standard-color);
}

.source-tab.active {
  --tab-line-color: var(--theme-body-color);
  color: var(--primary-accent);
  border-bottom-color: transparent;
  background-color: white;
}

.source-tab:not(.active):hover {
  --tab-line-color: var(--tab-line-hover-color);
  background-color: var(--theme-toolbar-hover);
}

.source-tab .img.prettyPrint,
.source-tab .img.blackBox {
  mask-size: 14px;
  background-color: currentColor;
}

.source-tab .filename {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  padding-inline-end: 4px;
  color: var(--theme-body-color);
}

.source-tab .filename span {
  opacity: 0.7;
  padding-inline-start: 4px;
}

.source-tab .close-btn {
  visibility: hidden;
  margin-inline-end: -6px;
}

.source-tab.active .close-btn {
  color: var(--theme-body-color);
}

.source-tab.active .close-btn,
.source-tab:hover .close-btn {
  visibility: visible;
}

.source-tab.active .source-icon {
  background-color: currentColor;
}

.source-tab .close-btn:hover,
.source-tab .close-btn:focus {
  color: var(--theme-selection-color);
  background-color: var(--tab-standard-color);
  background-color: var(--primary-accent);
}
